// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode 

package net.minecraft.src;

import net.minecraft.client.Minecraft;
import org.lwjgl.opengl.GL11;

import java.io.*;
import java.util.*;
import net.minecraft.client.Minecraft;
// Referenced classes of package net.minecraft.src:
//            GuiContainer, ContainerFurnace, FontRenderer, RenderEngine, 
//            TileEntityFurnace, InventoryPlayer

public class GuiNetherrackFurnace extends GuiContainer
{

    public GuiNetherrackFurnace(InventoryPlayer inventoryplayer, TileEntityNetherrackFurnace tileentityfurnace)
    {
        super(new ContainerNetherrackFurnace(inventoryplayer, tileentityfurnace));
        furnaceInventory = tileentityfurnace;
        //debug log
        /*try
        {
            
            File log = new File((new StringBuilder()).append(Minecraft.getMinecraftDir()).append("/mod_NetherrackFurnace.log").toString());
            FileWriter fw = new FileWriter(log,true);
            PrintWriter pw=new PrintWriter(fw);
            pw.println("--Gui-started");
            pw.close();
        }
        catch(IOException ioexception)
        {
            ioexception.printStackTrace();
        }*/
    }

    protected void drawGuiContainerForegroundLayer()
    {
        fontRenderer.drawString("Netherrack Furnace", 60, 6, 0x404040);
        fontRenderer.drawString("Inventory", 8, (ySize - 96) + 2, 0x404040);
                //debug log
        /*try
        {
            
            File log = new File((new StringBuilder()).append(Minecraft.getMinecraftDir()).append("/mod_NetherrackFurnace.log").toString());
            FileWriter fw = new FileWriter(log,true);
            PrintWriter pw=new PrintWriter(fw);
            pw.println("Gui-drawGuiContainerForegroundLayer");
            pw.close();
        }
        catch(IOException ioexception)
        {
            ioexception.printStackTrace();
        }*/
    }

    protected void drawGuiContainerBackgroundLayer(float f)
    {
        int i = mc.renderEngine.getTexture("/gui/furnace.png");
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        mc.renderEngine.bindTexture(i);
        int j = (width - xSize) / 2;
        int k = (height - ySize) / 2;
        drawTexturedModalRect(j, k, 0, 0, xSize, ySize);
        if(furnaceInventory.isBurning())
        {
            int l = furnaceInventory.getBurnTimeRemainingScaled(12);
            drawTexturedModalRect(j + 56, (k + 36 + 12) - l, 176, 12 - l, 14, l + 2);
        }
        int i1 = furnaceInventory.getCookProgressScaled(24);
        drawTexturedModalRect(j + 79, k + 34, 176, 14, i1 + 1, 16);
                //debug log
        /*try
        {
            
            File log = new File((new StringBuilder()).append(Minecraft.getMinecraftDir()).append("/mod_NetherrackFurnace.log").toString());
            FileWriter fw = new FileWriter(log,true);
            PrintWriter pw=new PrintWriter(fw);
            pw.println("Gui-drawGuiContainerBackgroundLayer");
            pw.close();
        }
        catch(IOException ioexception)
        {
            ioexception.printStackTrace();
        }*/
    }

    private TileEntityNetherrackFurnace furnaceInventory;
}

